/**
 * \file	Common.h
 * \author	Caio Arce Nishibe (caionishibe@gmail.com)
 * \date	August, 2014
 * \brief	Common enumerations definitions.
 */
#ifndef __COMMON_H
#define __COMMON_H

#include <string>
#include <stdlib.h>
#include <iostream>

using namespace std;

/**
 *\brief Node value type enumeration.
 */
typedef enum TypeEnum
{
	/**
	 *\brief unknown value type.
	 */
	ERROR = -1,
	/**
	 * \brief <c>void</c> value type.
	 */
	VOID,
	/**
	 * \brief <c>double</c> value type.
	 */
	DOUBLE,
	/**
	 * \brief <c>string</c> value type.
	 */
	STRING,
	/**
	 * \brief comparator value type.
	 */
	COMPARATOR,
	/**
	 * \brief logic operator value type.
	 */
	LOGIC,
	/**
	 * \brief arithmetic operator value type.
	 */
	ARITHMETIC
} Type;


/**
 * \brief Node kind enumeration.
 */
typedef enum KindEnum
{
	/**
	 * \brief unknown node kind.
	 */
	NONE = -1,
	/**
	 * \brief program node.
	 */
	PROGRAM,
	/**
	 * \brief program name node. 
	 */
	NAME,
	/**
	 * \brief variables declaration node.
	 */
	DECL,
	/**
	 * \brief rules node
	 */
	RULES,
	/**
	 * \brief rule set node
	 */
	RULE_SET,
	/**
	 * \brief rule node
	 */
	RULE,
	/**
	 *  \brief condition node
	 */
	CONDITION,
	/**
	 * \brief internal condition node
	 */
	INTERNAL_CONDITION,
	/**
	 * \brief action node
	 */
	ACTION,
	/**
	 * \brief commands node
	 */
	COMMANDS,
	/**
	 * \brief command node
	 */
	CMD,
	/**
	 * \brief arithmetic expression node
	 */
	ARITH_EXPR,
	/**
	 * \brief assignment node
	 */
	ASSIGNMENT,
	/**
	 * \brief read sensor node
	 */
	READ_SENSOR,
	/**
	 * \brief write actuator node
	 */
	WRITE_ACTUATOR,
	/**
	 * \brief message node
	 */
	MESSAGE
} Kind;

/**
 * \brief Comparation Operator Enumeration
 */
typedef enum CompOpEnum
{
	/**
	 * less than operator.
	 */
	LESS = 0,
	/**
	 * less equal than operator.
	 */
	LESS_EQUAL,
	/**
	 * greater than operator.
	 */
	GREATER,
	/**
	 * greater equal than operator.
	 */
	GREATER_EQUAL,
	/**
	 * different operator.
	 */
	DIFFERENT,
	/**
	 * equal operator.
	 */
	EQUAL

} CompOp;

/**
 * \brief Logic operator enumeration.
 */
typedef enum LogicOpEnum
{
	/** 
	 * \brief logical not operator.
	 */
	NOT = 0,
	/**
	 * \brief logical and operator.
	 */
	AND,
	/**
	 * \brief logical or operator.
	 */
	OR
} LogicOp;

/**
 * \brief Arithmetic operator enumeration. 
 */
typedef enum ArithOpEnum
{
	/**
	 * \brief sum operator.
	 */
	SUM = 0,
	/**
	 * \brief subtraction operator.
	 */
	SUBTRACTION,
	/**
	 * \brief multiplication operator.
	 */
	MULTIPLICATION,
	/**
	 * \brief division operator.
	 */
	DIVISION
} ArithOp;


#include "Value.h"



#endif